<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>消息发布管理</title>
    <script>document.write('<script src="../../plugin/vue/js/import.js?' + Math.random() + '"><' + '/script>');</script>
    <script>_import("../../plugin/vue/js/before.js");</script>
</head>
<body>
	<div id="app" class="container" v-cloak>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="el-icon-document mr5"></i>消息发布管理</h3>
            </div>
            <div class="panel-body">
                <!-- search -->      
                <el-card class="box-card mb10 w-boxcard" shadow="never">
                  <div slot="header" class="clearfix">
                    <span class="f16 lh38">查询条件</span>    
                    <el-button class="pull-right" type="primary" @Click="search">查询</el-button>                
                  </div>                                       
                <el-form  label-width="86px">              
                <el-row :gutter="20">
                	<!--  部门 -->
                	<el-col span="8">
                		<el-form-item label="归属部门:">
		                	<el-cascader  :options="cascaderdept.depts" v-model="cascaderdept.deptvalue"
								:show-all-levels="cascaderdeptOpt.showallevels" :change-on-select="cascaderdeptOpt.changeonselect"
								:filterable="cascaderdeptOpt.filterable"  :props="cascaderdeptOpt.defaultProps"
								:clearable="cascaderdeptOpt.clearable" @change="deptChg">
							</el-cascader>
						</el-form-item>
					</el-col>
                    <el-col span="8">
	                    <el-form-item label="创建时间:" class="media-mr0">   
	                     	<el-date-picker v-model="createDate" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期">
	                        </el-date-picker>
	                    </el-form-item>
                    </el-col>
                    
                    <el-col span="8">
	                    <el-form-item label="消息状态:">
	                        <el-select v-model="msgSts" placeholder="请选择">
	                            <el-option v-for="item in mstOptions" :key="item.code" :label="item.code_desc" :value="item.code">
	                            </el-option>
	                        </el-select>
	                    </el-form-item> 
                    </el-col>
                </el-row>      
                <el-row :gutter="20">
                	<!-- 标题 -->
                	<el-col span="8">
                		<el-form-item label="消息标题:">
                			<el-input v-model="title" placeholder="请输入标题"></el-input>
                		</el-form-item>
                	</el-col>
                	<el-col span="8">
	                    <el-form-item label="消息类型:">
	                        <el-select v-model="msgType" placeholder="请选择">
	                            <el-option v-for="item in mtpOptions" :key="item.code" :label="item.code_desc" :value="item.code">
	                            </el-option>
	                        </el-select>
	                    </el-form-item> 
                    </el-col>
                </el-row>
               	</el-form>
                </el-card> 
                <!-- search END-->
                <el-row :gutter="20">                    
                    <!-- box -->
                    <el-col :span="24">
                        <div class="grid-content">
                            <el-row class="tr mb3">
                            	<el-button type="primary"  @click="newMsg">添加</el-button>
                                <el-button type="primary"  @click="delMsg">删除</el-button>                           
                            </el-row>
                             <el-table ref="msgTable" :data="msgData" border style="width: 100%;" @selection-change="choseMsg" class="w-tablesub"
                             :expand-row-keys="expands" :row-key="getRowKeys">
                               <el-table-column type="selection" width="55"></el-table-column>
                                <el-table-column  label="消息标题" width="300" class="w-textsub">
				                    <template slot-scope="scope">
				                        <el-popover trigger="hover" placement="top-start">
				                            <p class="w-tablepop">{{ scope.row.msg_title }}</p>
				                            <div slot="reference" >
				                               <a @click="titleLink(scope.row)">
				                               	 {{ scope.row.msg_title }}
				                               </a>				                               
				                            </div>		                           
				                        </el-popover>
				                    </template>
                				</el-table-column>
                				
                                <el-table-column prop="msg_type_name" label="消息类型" width="120">
                                </el-table-column>
								<el-table-column prop="create_date" label="消息创建时间">
                                </el-table-column>
                                <el-table-column prop="msg_status_name" label="消息状态">
                                </el-table-column>                               
                                
                                <el-table-column label="操作">
                                     <template slot-scope="scope">
                                     	<span v-if="scope.row.msg_status!='msg_status_1'" style="font-size:18px">
                                     		<!--  
                                     		<i class="el-icon-search" title="查看" @click="chkMsg(scope.row)" style="cursor:pointer;"></i>
                                     		<i class="el-icon-sort" title="查看2" @click="sortMsg(scope.row)" style="cursor:pointer;"></i>
                                     		-->
                                     		<i class="el-icon-edit-outline" title="编辑" @click="editMsg(scope.row)" style="cursor:pointer;"></i>
                                     		<i class="el-icon-upload" title="发布" @click="pubMsg(scope.row)" style="cursor:pointer;"></i>
                                     		<i class="el-icon-share" title="部门回复" @click="rpyMsg(scope.row)" style="cursor:pointer;"></i>
                                     	</span>
                                     		<i class="el-icon-view" title="查看" @click="vhtml(scope.row)" style="cursor:pointer;"></i>
                                     </template>
                                </el-table-column>    
                                <el-table-column type="expand" width="1">
	                               	<template slot-scope="props">
	                               		<!--  <comlist ref="clist" v-if="exec=='comlist'" :args.sync="curRowOption" :delable.sync="comDel"></comlist>-->
	                               		<comlist ref="clist" v-if="exec=='comlist'" :args.sync="curRowOption" ></comlist>
	                               	</template>
                                </el-table-column>                   
                            </el-table> 
                            
                            <div class="block mt10">
                                <el-pagination @size-change="handleSizeChange"
                                    @current-change="handleCurrentChange"
                                    :current-page="currentPageNbr" :page-sizes="pageSizes"
                                    :page-size="pageSize" class="w-tc"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="totalRecords"> </el-pagination>
                            </div>
                        </div>
                    </el-col>
                    
                </el-row>
            </div>
        </div>    
        
        <!--  
        <jwb-dialog ref="bddg"></jwb-dialog>
        -->
    </div>
<script>
    _import("../../plugin/vue/js/after.js");
</script>   
<script>
    _import("js/comlist.js");
</script>
<script>
    _import("js/msglist.js");
</script>
</body>
</html>